
<form id="form" action="{:url('product/create')}">
<input type="hidden" name="images" value="" id="images" />
<table class="formtable"> 
    <tr><th>产品编码:</th><td><input class="input w200" datatype="*" type="text" name="code" value="" /> <span class="gray">不知道可不填写</span></td></tr>
    <tr>
        <th>产品分类:</th>
        <td>
            <select datatype="*" class="select w200" name="category_id">
                <option value=" ">请选项产品分类</option>
                {foreach $category as $vo}
                    <option value="{$vo.id}">{$vo.title}</option>
                {/foreach}
            </select>
        </td>
    </tr>
    <tr><th>产品名称:</th><td><input class="input w300" datatype="*" type="text" name="title" value="" /></td></tr>
    <tr><th>产品描述:</th><td><textarea class="textarea h80 w500" datatype="*" type="text" name="note" value=""></textarea></td></tr>
    <tr><th>图片样式</th><td><div class="img-review fn-cp"></div></td></tr>
    <tr>
        <th></th>
        <td>
            <input type="submit" value="确定" class="button button-blue submit" />
            <input type="reset" value="重置" class="button button-blank"/>
        </td>
    </tr>
</table>
</div>
</form>
<script type="text/javascript">
Do('base','layer','form',function(){
    $('#form').isForm();
    $(".img-review").click(function(){openwin('{:url("system/passport.common/upload")}')}); 
})
//添加图片
function setImg(show_src){
    $("#images").val(show_src);
    $(".img-review").html('<img src="'+show_src+'">');  
}
</script>